package com.sg.dto.biz.app.common;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @desc LookAncestorNodeDto
 * @使用场景
 */
@Data
public class LookAncestorNodeDto extends BaseDto implements Serializable {

    /**
     * 关联目标内容类型编码 TARGET:目标 TARGET_CATEGORY:目标分类 OBJECTIVE:指标
     */
    @ApiModelProperty("关联目标内容类型编码")
    private String targetCycleContentTypeCode;

    /**
     * 关联目标内容ID
     */
    @ApiModelProperty("关联目标内容ID")
    private String targetCycleContentId;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        LookAncestorNodeDto that = (LookAncestorNodeDto) o;
        return targetCycleContentTypeCode == that.targetCycleContentTypeCode && targetCycleContentId == that.targetCycleContentId;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), targetCycleContentTypeCode, targetCycleContentId);
    }

}
